import { ApiCall } from "tsrpc";
import { ReqAdd, ResAdd } from "../../shared/protocols/teamUser/PtlAdd";
import {Global} from "../../mongodb";

export default async function (call: ApiCall<ReqAdd, ResAdd>) {
    let query = { ...call.req.query };
    const ret = await Global.db.collection('team_members').insertOne(query);
    return call.succ({ newID: ret.insertedId.toString() })
}
